<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div>
  <video autoplay playsinline id="player"></video>
</div>
<script src="../static/adapter.js"></script>
<script src="../utils/utils.js"></script>
<script>
  'use strict'
  var $videoPlay = $('video#player')

  function gotMediaStream (stream) {
    $videoPlay.srcObject = stream
  }

  function start () {
    const getUserMedia = testUserMedia()
    if (getUserMedia) {
      navigator.mediaDevices.getUserMedia({ video: true })
        .then(gotMediaStream)
        .catch(handleError)
    }
  }

  start ();

</script>
</body>
</html>
